<template>
    <div>
        <li v-for="i in list">{{i.name}}</li>
        <pages :total='total' @pagesize='getpagesize' />
    </div>
</template>

<script>
import pages from './pages.vue'
    export default {
        name:'catesshow',
        components:{
            'pages':pages
        },
        data() {
            return {
                list:[],
                total:0,
                page:1
            }
        },
        methods: {
            getcate(){
                this.$axios.get('/course/pageshow/?page='+this.page).then(res=>{
                    this.list =res.data.list
                    this.total =res.data.total
                })
            },
            getpagesize(v){
                this.page = v
                this.getcate()
            }
        },
        mounted() {
            this.getcate()
        },
    }
</script>

<style scoped>

</style>